package org.tysite.tyservice.example.validation.controller;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.tysite.tyservice.example.validation.dto.CustomVerifyDTO;

/**
 * 自定义参数验证注解演示入口API
 * @author tysite
 * @date 2020/3/22 0022 20:51
 */
@RestController
@RequestMapping("/api/example/validation/custom")
public class CustomVerifyController {
    
    @PutMapping("")
    public CustomVerifyDTO demo(@Validated @RequestBody CustomVerifyDTO dto) {
        return dto;
    }
    
}